from google.appengine.api import memcache

from model import livehabr
from model import comments

def main():
    memcache.delete('main')
    new_comments = livehabr.getComments()
    comments.add(new_comments)
    return len(new_comments['items'])

if __name__ == '__main__':
    count = main()
    print 'Content-Type: text/plain\n'
    print 'success: %s' % count